<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box1 {
        border: 15px solid pink;
        width: 200px;
        height: 200px;
        border-image: url(./border.png);
        border-image-slice: 30;
        border-image-repeat: round;
        display: inline-block;
      }

      .box2 {
        display: inline-block;
        border: 15px solid pink;
        width: 200px;
        height: 200px;
        border-image: url(./border2.png);
        border-image-slice: 72 55 30 190;
        /* 不规则图片需要将 边框图片宽度(border-image-width) 按分割的尺寸 设置上 */
        border-image-width: 72px 55px 30px 190px;
      }
    </style>
  </head>
  <body>
    <div class="box1"></div>
    <div class="box2"></div>
  </body>
</html>
